
#ifndef _GAME_H_
#define _GAME_H_
#include "Global.h"
class CGame
{
private:
protected:
	void _SetScreenDimension(int Mode);

	static LRESULT CALLBACK _WinProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);

	void _InitWindow();
	void _InitDirectX();
	void _InitKeyboard();
	
	// Render a single frame
	void _RenderFrame();
	void _Update();
	void _ProcessKeyBoard();
	int IsKeyDown(int KeyCode);

	// Place holder for sub classes
	virtual void RenderFrame();
	virtual void Update(int Delta);
	virtual void InitGame();
	virtual void ProcessInput();
	virtual void OnKeyDown(int KeyCode);
	virtual void OnKeyUp(int KeyCode);
public:
	CGame(HINSTANCE hInstance, char* Name, int Mode, int IsFullscreen, int FrameRate);
	~CGame();

	// Initialize the game with set parameters
	void Init();

	// Run game
	void Run();
};
#endif

